@extends('layouts.front')

@section('title', ' - 提现')

@section('content')
@push('styles')
<style>
    body {
        background-color: #fff;
    }
    .withdrawal-history .weui-cell .status.success {
        color: #04a25c
    }
    .withdrawal-history .weui-cell .status.cancel {
        color: #999
    }
    .withdrawal-history .weui-cell .status.failed {
        color: #FF0000
    }
    .withdrawal-history .weui-cell .status.processing {
        color: #04a25c
    }
</style>
@endpush

<div class="withdrawal withdrawal-history">
    <div class="weui-cells">
        @foreach ($withdraw as $item)
            <div class="weui-cell">
                <div class="weui-cell__bd">
                    <p>提现金额</p>
                    <p class="time">{{ $item->created_at }}</p>
                </div>
                <div class="weui-cell__ft">
                    <p class="amount">{{ number_format($item->amount, 2, '.', '') }}</p>
                    @switch($item->status)
                        @case('success')
                            <p class="status success">提现成功</p>
                            @break
                        @case('cancel')
                            <p class="status cancel">提现已取消</p>
                            @break
                        @case('failed')
                            <p class="status failed">提现失败</p>
                            @break
                        @case('processing')
                            <p class="status processing">正在处理</p>
                            @break
                        @default
                            
                    @endswitch
                </div>
            </div>
        @endforeach
    </div>
</div>

@section('tabbar')
@endsection

@push('scripts')
@endpush
@endsection
